package org.openfidias.jdbase.view;

import java.io.IOException;
import org.apache.commons.lang.StringUtils;
import org.openfidias.jdbase.controller.AlunoDisciplinaBo;
import org.openfidias.jdbase.lang.Choose;
import org.openfidias.jdbase.model.AlunoDisciplinaDao;
import org.openfidias.jdbase.template.IView;
import org.openfidias.jdbase.template.View;

/**
 *
 * @author atila
 */
public class AlunoDisciplinaView implements IView {

	private AlunoDisciplinaView() {
   }

   public static AlunoDisciplinaView getInstance() {
      return AlunoDisciplinaViewHolder.INSTANCE;
   }

   private static class AlunoDisciplinaViewHolder {

      private static final AlunoDisciplinaView INSTANCE = new AlunoDisciplinaView();
   }

   public void begin() throws IOException, Exception {
      View.begin(AlunoDisciplinaBo.getInstance(), AlunoDisciplinaDao.getInstance(), "Aluno_Disciplina");
   }

   /**
    * @deprecated 
    */
   public void menu() {
      StringBuilder builder = new StringBuilder();
      builder.append(StringUtils.center(" View Aluno_Disciplina ", 60, " · "));
      builder.append("\n\n");
      builder.append("[.create] Criar Aluno_Disciplina\n");
      builder.append("[.read] Visualizar Aluno_Disciplina\n");
      builder.append("[.read_all][*] Visualizar Todos Aluno_Disciplina\n");
      builder.append("[.delete] Deletar Aluno_Disciplina\n");
      builder.append("[.quit][.back][.clear]");
      System.out.println(builder.toString());
   }
}

